-- card: 14666 from stack: in.1 -- bmap block id: 0 -- flags: 0000 -- background id: 14090 -- name: PinPointer -- part 1 (field) -- low flags: 00 -- high flags: 0007 -- rect: left=67 top=80 right=272 bottom=496 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 2 (button) -- low flags: 00 -- high flags: A003 -- rect: left=339 top=281 right=303 bottom=426 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Pinpointer ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup put the number of card fields into theFields put the number of card buttons into theButtons put the lineSize into initialLineSize put the centered into initialCentered put the textAlign into initialTextAlign put the filled into initialFilled put the pattern into initialPattern put the textFont into initialTextFont put the textSize into initialTextSize put the editBkgnd into initialEditBkgnd set the lineSize to 1 set the centered to false set the textAlign to center set the pattern to 1 set the textFont to Monaco set the textSize to 9 set the textStyle to plain set the editBkgnd to true repeat with thePass = 1 to 2 if thePass = 1 then set the filled to true else set the filled to false if theFields is not 0 then repeat with thisField = 1 to theFields if the visible of card field thisField = true then choose rectangle tool get the rectangle of card field thisField put item one of it into topLeft put "," & item two of it after topLeft subtract 1 from item three of it subtract 1 from item four of it put item three of it into bottomRight put "," & item four of it after bottomRight drag from topLeft to bottomRight end if end repeat end if if theButtons is not 0 then repeat with thisButton = 1 to theButtons if the visible of card button thisButton = true then get the rectangle of card button thisButton put item one of it into topLeft put "," & item two of it after topLeft subtract 1 from item three of it subtract 1 from item four of it put item three of it into bottomRight put "," & item four of it after bottomRight if the style of card button thisButton = "roundRect" then choose round rect tool else choose rectangle tool drag from topLeft to bottomRight end if end repeat end if end repeat choose text tool repeat with object = 1 to (theFields + theButtons) if object ≤ theFields then if the visible of card field object is true then get the location of card field object add 3 to item two of it click at it type "Field #" & object end if else if the visible of card button (object - theFields) is true then put the location of card button (object - theFields) into center get the style of card button (object - theFields) if it is not "roundRect" and it is not "checkBox" and it is not "radioButton" then subtract 5 from item 2 of center click at center type "Button" & return & "#" & (object - theFields) else add 3 to item two of center click at center type "Button #" & (object - theFields) end if end if end if end repeat set the editBkgnd to false choose browse tool set the editBkgnd to initialEditBkgnd set the lineSize to initialLineSize set the centered to initialCentered set the textAlign to initialTextAlign set the filled to initialFilled set the pattern to initialPattern set the textFont to initialTextFont set the textSize to initialTextSize end mouseUp -- part contents for background part 5 ----- text ----- 5 -- part contents for background part 12 ----- text ----- PinPointer -- part contents for card part 1 ----- text ----- THIS BUTTON WILL PAINT OVER ANY ARTWORK CURRENTLY IN THE BACKGROUND OF THE STACK IN WHICH IT IS PLACED. PLEASE WORK ON A COPY OF THE STACK IN WHICH YOU THINK YOU MIGHT WANT TO USE THIS BUTTON! From: William G. Anderson, Jr. 76254,356 What does it do? If you have ever created buttons and fields in the card plane of a stack, and then gone to the background plane and wondered where all of those card objects were located (especially if you were painting something specific to a card object) then you may wish to use this button. It gets the rectangle of each visible card object, then redraws the rectangle in the background plane. Each rectangle is then labeled as representing either a button or field, as well as showing the number of the object. How it works: Once the button is pressed a filled white round rectangle is painted in the background plane for each visible round rectangle button, and a filled white rectangle is painted for each visible field and all other types of visible buttons. The choice of filled rectangles was made in case the background in which they are drawn contains artwork, in which case an unfilled figure would be obscured. In a second pass, each rectangle is redrawn unfilled. This will show the edges of each object in case they overlap, which would obscure part of one of the filled objects drawn in the first pass. Finally, each object is labeled either as "Field #" or "Button #". Because it is rather slow (if there are a large number of objects to draw), and the cursor cannot simply be set to the "watch" (it changes back to whatever drawing tool cursor is being used at the time), I chose not to lock the screen during the operation. At least then you can see what is happening. Limitations: While I tried to preserve any settings that could be changed during the operation of this button, I was unable to find a way to reset multiple font style settings. Therefore, at the completion of the script the font style is reset to "plain". How to use this button: Simply copy the button labeled "Pinpointer" in the lower right corner of this card and paste it into the BACKGROUND of the card in which you would like to use it. It will work as well if pasted into the card layer, but will then also draw a representation of itself in the background layer. (I know this may not please everyone, but if I made it not draw a representation of itself by having it check for the name "Pinpointer" someone would make a button with the same name and claim the script was flawed.) Once you are finished with the button simply cut it from the card. Snide remarks, whining, and lavish praise may be easyplexed to me: William G. Anderson, Jr. 76254,356